class SpecialityController < ApplicationController
  def autocomplete
     @tags = Speciality.where("name LIKE ?", "%#{ params[:q] }%")
     @tags << Speciality.new(:name=>params[:q])
     respond_to do |format|
       format.html 
       format.json { render :json => @tags.collect{|t| {:id => t.name, :name => t.name }}}
     end
  end

end
